Release 10.1A: OpenEdge Development:
Progress Dynamics Getting Started
Customizing the entity data
Once you have imported default data into your entity tables from the application database schema, you can customize that data as needed. You can change the fields, field formats, or the order in which the fields appear.
Part of the best practices recommendation for database design in Progress Dynamics is to include a unique key field on each table that is used only as a target for relationships. These are the object (_obj) fields. Generally, you do not want the object field that uniquely identifies a table to appear in visual objects for that table. You can eliminate them through the Entity Control tool.
By default, the Object Generator creates field labels by appending the table name to the field name. You might not want to see the table name appearing in every label. You can use the Entity Control to change the default label for a field.
![]()
To customize the entity data:
- Choose System
Entity Control. The Entity Control dialog box appears:
![]()
- Select dynsports in the Database combo box.
- Double-click the ARMCU record. The Entity Maintenance dialog box appears.
- Choose the Modify record button
.
- Select the customer_obj record on the Datafields tab:
![]()
- Unselect the Include in browsers and Include in viewers toggle boxes.
The
_objfields are meant only for internal use. Their principal use on GUI objects is as a target for SDFs. Browsers do not support SDFs, so you should uncheck that box for all_objfields. You are unlikely to want an SDF based off the same table for which you are generating a viewer, so you should always uncheck that box for the_objfield of the table with which you are working.- Choose Save. The dialog box should look like this:
![]()
- Select the login_company_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Login company, and save your changes.
- Select the salesrep_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Sales rep, and save your changes.
- Set the default labels for the other fields as follows:
Note: You must save your changes after altering each individual record.
Field instance Label Customer code Customer name Comments Credit limit Balance Discount Terms FaxNotice that you also have access to the Dynamic properties sheet for each field in the Edit master section of this tab. If there are properties that you always set, setting them here might be easier than doing it after you generate the objects.
Now, you must make similar changes for the other entities needed in the tutorial.
![]()
To customize the remaining entries:
- Select the ARMSR record in the Entity Control dialog box. The Entity Maintenance dialog box repopulates with the records for the new entity.
- Select salesrep_obj on the Data Fields tab.
- Unselect the Include in browsers and Include in viewers toggle boxes, and save your changes.
- Select the ARTOL record in the Entity Control dialog box. The Entity Maintenance dialog box repopulates with the records for the new entity.
- Select orderline_obj on the Data Fields tab.
- Unselect the Include in browsers and Include in viewers toggle boxes, and save your changes.
- Select the status_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Status, and save your changes.
- Select the item_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Item, and save your changes.
- Select the order_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Order, and save your changes.
- Set the default labels for the other fields as follows:
- Select the ARTOR record in the Entity Control dialog box. The Entity Maintenance dialog box repopulates with the records for the new entity.
- Select order_obj on the Data Fields tab.
- Unselect the Include in browsers and Include in viewers toggle boxes, and save your changes.
- Select the status_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Status, and save your changes.
- Select the customer_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Customer, and save your changes.
- Select the salesrep_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Sales rep, and save your changes.
- Select the warehouse_obj record.
- Unselect the Include in browsers toggle box. You want this field as an SDF target on viewers.
- Set the Label for the field to Warehouse, and save your changes.
- Set the default labels for the other fields as follows:
Field instance Label Order code Order date Promise date Ship date Carrier Instructions PO Terms Credit card Incoming- Exit the Entity Maintenance and Entity Control dialog boxes, then restart your Progress Dynamics session.
Before generating your application objects, you must clear the framework’s cached data. This ensures that the Object Generator has access to the changes you made in the entity data.
Remember to reconnect the application database after restarting your session.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |